<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.staticfile.org/jquery/3.2.1/jquery.min.js"></script>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        ul{
            display: flex;
            width: 500px;
        }
        li{
            text-align: center;
            line-height: 40px;
            flex-grow: 1;
            border: 1px solid #000;
        }
        li.action{
            background-color: red;
            color: #fff;
        }
        div{
            width: 500px;
            height: 200px;
            display: none;
            border: 1px solid #000;
        }
        div.action{
            display: block;
        }
    </style>
</head>
<body>
    <ul>
        <li class="action">标题1</li>
        <li>标题2</li>
        <li>标题3</li>
        <li>标题4</li>
        <li>标题5</li>
    </ul>
    <section>
        <div class="action">内容01</div>
        <div>内容02</div>
        <div>内容03</div>
        <div>内容04</div>
        <div>内容05</div>
    </section>
    <script>
        $("li").mouseenter(function(){
            // $(this).addClass("action");
            // $(this).siblings().removeClass("action");
            $(this).addClass("action").siblings().removeClass("action");
            $("div").eq($(this).index()).addClass("action").siblings().removeClass("action");
        })

    </script>
</body>
</html>